package junit;

import org.junit.experimental.theories.DataPoints;
import org.junit.experimental.theories.Theories;
import org.junit.experimental.theories.Theory;
import org.junit.runner.RunWith;

/**
 * JunitTheory..
 *
 * @author Lizhong
 * @date 2019/5/7
 */
@RunWith(Theories.class)
public class JunitTheory {
    /*
    @DataPoint
    public static String nameValue1 = "Tony";
    @DataPoint
    public static String nameValue2 = "Jim";
    @DataPoint
    public static int ageValue1 = 10;
    @DataPoint
    public static int ageValue2 = 20;
    */
    @DataPoints
    public static String[] names = {"A", "B", "C"};
    @DataPoints
    public static int[] ages = {1, 2, 3};

    @Theory
    public void testMethod(String name, int age) {
        System.out.println(String.format("%s's age is %s", name, age));
    }
}